﻿using DocumentFormat.OpenXml.Lite.DrawingML.Geometry.Properties;
using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Shared;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Chart
{
    public class Wall : XmlSerializable
    {
        [Optional]
        [XmlElement("thickness", Namespace = Constants.Chart)]
        public Thickness Thickness { get; set; }

        [Optional]
        [XmlElement("spPr", Namespace = Constants.Chart)]
        public ShapeProperties ShapeProperties { get; set; }

        [Optional]
        [XmlElement("pictureOptions", Namespace = Constants.Chart)]
        public PictureOptions PictureOptions { get; set; }

        [Optional]
        [XmlElement("thickness", Namespace = Constants.Chart)]
        public ExtensionList ExtensionList { get; set; }

        public Wall() { }
    }

    [XmlRoot("thickness", Namespace = Constants.Chart)]
    public class Thickness : XmlSerializable
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public uint Value { get; set; }

        public Thickness() { }
    }

    [XmlRoot("pictureOptions", Namespace = Constants.Chart)]
    public class PictureOptions : XmlSerializable
    {
        [Optional]
        [XmlElement("applyToFront", Namespace = Constants.Chart)]
        public NullableValue<bool> ApplyToFront { get; set; }

        [Optional]
        [XmlElement("applyToSides", Namespace = Constants.Chart)]
        public NullableValue<bool> ApplyToSides { get; set; }

        [Optional]
        [XmlElement("applyToEnd", Namespace = Constants.Chart)]
        public NullableValue<bool> ApplyToEnd { get; set; }

        [Optional]
        [XmlElement("pictureFormat", Namespace = Constants.Chart)]
        public NullableValue<ST_PictureFormat> PictureFormat { get; set; }

        [Optional]
        [XmlElement("pictureStackUnit", Namespace = Constants.Chart)]
        public NullableValue<double> PictureStackUnit { get; set; }

        public PictureOptions() { }
    }
}
